# -*- coding: utf-8 -*-
# !/usr/bin/python
import functools
import time


def clock(name):
    def wrap(func):
        @functools.wraps(func)
        def inner(*args, **kwargs):
            start_time = time.time()
            func(*args, **kwargs)
            end_time = time.time()
            print("%s耗时 %s s" % (name, (end_time - start_time)))

        return inner

    return wrap


@clock("测试函数")
def test(name):
    """
    :param name: 测试名
    :return:
    """
    # time.sleep(5)
    return("%s是个测试！！！" % name)


def printf(name):
    return "测试%s" % name


test("李庆泽")
# print(test.__name__)
# print(test.__doc__)

name_list = ["张三", "李四", "牛五"]

test_list = map(printf, name_list)
for i in test_list:
    print(i)
